package net.wanho.util;

/**
 * Author：汤小洋
 * Date：2024-01-05 11:40
 * Description：<描述>
 */
public class SaltUtil {

    public static String getSalt(int n){
        char[] chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()".toCharArray();
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<n;i++){
            char aChar = chars[(int)(Math.random() * chars.length)];
            sb.append(aChar);
        }
        return sb.toString();
    }

}
